
<%@ page import="org.gtesoreria.Afiliado" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'afiliado.label', default: 'Afiliado')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
       
        <div class="body">
            <h1>Resultado busqueda de afiliados</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list" style="width:950px">
                <table>
                    <thead>
                        <tr>
                        
                            <g:sortableColumn property="legajo" title="${message(code: 'afiliado.legajo.label', default: 'Legajo')}" params="${ [searchTextParam:searchTextParam]}"/>
                        
                            <g:sortableColumn property="apellidoNombre" title="${message(code: 'afiliado.apellidoNombre.label', default: 'Apellido y Nombres')}" params="${ [searchTextParam:searchTextParam]}" />
                        
                            <g:sortableColumn property="dni" title="${message(code: 'afiliado.dni.label', default: 'DNI')}" params="${ [searchTextParam:searchTextParam]}"/>
                        
                            <th>FechaNacimiento</th>
                            
                            <th>Centro de Trabajo</th>
                            
                            <th>Delegado</th>
                            
                            <th>Categoria</th>
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${afiliadoInstanceList}" status="i" var="afiliadoInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
     
                            <td><g:link action="show" id="${afiliadoInstance.id}">${fieldValue(bean: afiliadoInstance, field: "legajo")}</g:link></td>
                        
                            <td>${fieldValue(bean: afiliadoInstance, field: "apellidoNombre")}</td>
                        
                            <td>${fieldValue(bean: afiliadoInstance, field: "dni")}</td>
                        
                            <td><g:formatDate date="${afiliadoInstance?.fechaNacimiento}" format="dd-MM-yyyy"></g:formatDate></td>
                            
                            <td>${fieldValue(bean: afiliadoInstance, field: "lugarTrabajo")}</td>
                            
                            <td>${fieldValue(bean: afiliadoInstance, field: "delegado.apellidoNombre")}</td>
                            
                            <td>${fieldValue(bean: afiliadoInstance, field: "categoria")}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <g:form action="search"><g:hiddenField name="searchTextParam" value="${searchTextParam }"/></g:form>
            <div class="paginateButtons">
                <g:paginate total="${afiliadoInstanceTotal}" params="${ [searchTextParam:searchTextParam] }"/>
            </div>
        </div>
        
    </body>
</html>
